﻿

'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_Cabinet
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Properties and Fields "


    Private Const constRckKey As Int32 = -1
    Private Const constRckCompKey As Int32 = -1
    Private Const constRckRowKey As Int32 = -1
    Private Const constRckRowPos As Int16 = -1
    Private Const constRckGrid As String = "na"
    Private Const constRckDescription As String = "na"
    Private Const constRckType As String = "IDF"
    Private Const constRckComments As String = "none"
    Private Const constRckLastUpdate As Date = #1/1/2001#
    Private Const constRckLastEdit As String = ""

    Private m_rckkey As Int32
    Property rckKey() As Int32
        Get
            Return Me.m_rckkey
        End Get
        Set(ByVal value As Int32)
            Me.m_rckkey = value
            Me.OnPropertyChanged("rckKey")
        End Set
    End Property

    '
    ' pointer to the component object
    '
    Private m_rckCompKey As Int32
    Property rckCompKey() As Int32
        Get
            Return Me.m_rckCompKey
        End Get
        Set(ByVal value As Int32)
            Me.m_rckCompKey = value
            Me.OnPropertyChanged("rckCompKey")
        End Set
    End Property

    Private m_rckRowKey As Int32
    Property rckRowKey() As Int32
        Get
            Return Me.m_rckRowKey
        End Get
        Set(ByVal value As Int32)
            Me.m_rckRowKey = value
            Me.OnPropertyChanged("rckRowKey")
        End Set
    End Property

    Private m_rckRowPos As Int32
    Property rckRowPos() As Int16
        Get
            Return Me.m_rckRowPos
        End Get
        Set(ByVal value As Int16)
            Me.m_rckRowPos = value
            Me.OnPropertyChanged("rckRowPos")
        End Set
    End Property

    Private m_rckgrid As String
    Property rckGrid() As String
        Get
            Return Me.m_rckgrid
        End Get
        Set(ByVal value As String)
            Me.m_rckgrid = value
            Me.OnPropertyChanged("rckGrid")
        End Set
    End Property

    Private m_rckdescription As String
    Property rckDescription() As String
        Get
            Return Me.m_rckdescription
        End Get
        Set(ByVal value As String)
            Me.m_rckdescription = value
            Me.OnPropertyChanged("rckDescription")
        End Set
    End Property

    Private m_rcktype As String
    Property rckType() As String
        Get
            Return Me.m_rcktype
        End Get
        Set(ByVal value As String)
            Me.m_rcktype = value
            Me.OnPropertyChanged("rckType")
        End Set
    End Property

    Private m_rckcomments As String
    Property rckComments() As String
        Get
            Return Me.m_rckcomments
        End Get
        Set(ByVal value As String)
            Me.m_rckcomments = value
            Me.OnPropertyChanged("rckComments")
        End Set
    End Property

    Private m_rcklastupdate As Date
    Property rckLastUpdate() As Date
        Get
            Return Me.m_rcklastupdate
        End Get
        Set(ByVal value As Date)
            Me.m_rcklastupdate = value
            Me.OnPropertyChanged("rckLastUpdate")
        End Set
    End Property

    Private m_rcklastedit As String
    Property rckLastEdit() As String
        Get
            Return Me.m_rcklastedit
        End Get
        Set(ByVal value As String)
            Me.m_rcklastedit = value
            Me.OnPropertyChanged("rowLastEdit")
        End Set
    End Property


#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_rcklastedit = strUserId
    End Sub

#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            rckKey = constRckKey
            rckRowKey = constRckRowKey
            rckRowPos = constRckRowPos
            rckDescription = constRckDescription
            rckGrid = constRckGrid
            rckType = constRckType
            rckComments = constRckComments
            rckLastUpdate = Now()
            rckLastEdit = constRckLastEdit

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class

